<template>
    <div>
        <div class="tree-block">
            <vi-tree :data="data" :height="height"></vi-tree>
        </div>
    </div>
</template>
<script>
import {onMounted , ref } from 'vue'
import treeData from '../data/treeData'

export default {
    setup(){
        let data=ref([])
        const height=ref(300)

        const click=(val)=>{
            console.info('click',val);
        }

        onMounted(()=>{
            data.value=treeData.getTreeData(10)
        })

        return{
            data,
            height,
            click
        }
    }
}
</script>
<style>
    .tree-block{
        width: 300px;
    }
</style>